<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018-03-19
 * Time: 16:31
 */
namespace test;
class Person{
    private $name;
    public $age;
    function __construct($name,$age)
    {
             $this->setage($age);
             $this->setname($name);
    }
    public function setname($name){
      echo  $this->name=$name;
    }
    public function setage($age){
      echo  $this->age=$age;
    }
}
$xiaomin=new Person("11","22");
echo $xiaomin;